package com.kiwi.cases.match.usermatch;

import java.time.LocalDateTime;

/**
 * 用户位置信息，目前只使用 用户id、经度、纬度
 * @author: xuboru on 2018/1/8
 */
public class UserMatchVo
{
    //用户id
    protected String accountId;
    //经度
    protected Double longitude = 0D;
    //纬度
    protected Double latitude = 0D;
    //海拔
    protected Double altitude;
    //准确度
    protected Double acuracy;
    //来源
    protected String from;

    //用户其他信息
    //性别
    protected Integer sex;
    //年龄
    protected Integer age;

    protected LocalDateTime matchTime;

    public LocalDateTime getMatchTime()
    {
        return matchTime;
    }

    public UserMatchVo setMatchTime(LocalDateTime matchTime)
    {
        this.matchTime = matchTime;
        return this;
    }

    public String getAccountId()
    {
        return accountId;
    }

    public UserMatchVo setAccountId(String accountId)
    {
        this.accountId = accountId;
        return this;
    }

    public Double getLongitude()
    {
        return longitude;
    }

    public UserMatchVo setLongitude(Double longitude)
    {
        this.longitude = longitude;
        return this;
    }

    public Double getLatitude()
    {
        return latitude;
    }

    public UserMatchVo setLatitude(Double latitude)
    {
        this.latitude = latitude;
        return this;
    }

    public Double getAltitude()
    {
        return altitude;
    }

    public UserMatchVo setAltitude(Double altitude)
    {
        this.altitude = altitude;
        return this;
    }

    public Double getAcuracy()
    {
        return acuracy;
    }

    public UserMatchVo setAcuracy(Double acuracy)
    {
        this.acuracy = acuracy;
        return this;
    }

    public String getFrom()
    {
        return from;
    }

    public UserMatchVo setFrom(String from)
    {
        this.from = from;
        return this;
    }

    public Integer getSex()
    {
        return sex;
    }

    public UserMatchVo setSex(Integer sex)
    {
        this.sex = sex;
        return this;
    }

    public Integer getAge()
    {
        return age;
    }

    public UserMatchVo setAge(Integer age)
    {
        this.age = age;
        return this;
    }

    @Override
    public String toString()
    {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"accountId\":\"")
                .append(accountId).append('\"');
        sb.append(",\"longitude\":")
                .append(longitude);
        sb.append(",\"latitude\":")
                .append(latitude);
        sb.append(",\"altitude\":")
                .append(altitude);
        sb.append(",\"acuracy\":")
                .append(acuracy);
        sb.append(",\"from\":\"")
                .append(from).append('\"');
        sb.append(",\"sex\":")
                .append(sex);
        sb.append(",\"age\":")
                .append(age);
        sb.append(",\"matchTime\":")
                .append(matchTime);
        sb.append('}');
        return sb.toString();
    }
}
